import React from "react";
// 导入antd-mobile组件库
// import { Button } from "antd-mobile";
// 导入路由
import { BrowserRouter as Router, Route, Redirect } from "react-router-dom";
// 导入home组件
import Home from "./pages/Home";
import CityList from "./pages/CityList";
// 导入地图组件
import Map from './pages/Map'
import Search from "./pages/Search";




function App() {
  return (
    <Router>

      <div className="App">
        {/* 路由重定向 */}
        <Route path='/' exact render={() => <Redirect to="/home" />}></Route>
        {/* 配置路由 */}
        <Route path="/home" component={Home}></Route>
        <Route path="/citylist" component={CityList}></Route>
        {/* 地图路由 */}
        <Route path='/map' component={Map}></Route>
        {/* 搜索框路由 */}
        <Route path='/search' component={Search}></Route>
      </div>

    </Router >
  );
}

export default App;
